﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace ActiveDirectory.Models
{
    public class AdGroup
    {

        [Key, Column(Order = 1), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        public string Name { get; set; }

        [Key, Column(Order = 0), ForeignKey("AdAdmin")]
        public int AdminId { get; set; }

        [JsonIgnore]
        public virtual AdAdmin AdAdmin { get; set; }

        [JsonIgnore]
        public Guid AdGuid{ get; set; }

        [JsonIgnore]
        public bool IsCorrect { get; set; }
    }
}